#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>

 int print(num)
{
	 if (num > 9)
	 {
		 print(num / 10);
		 printf("%d ", num % 10);
		 
	 }
	 else
	 {
		 printf("%d ", num);
	 }

}



int main()
{
	int num = 0;
	scanf("%d", &num);
	print(num);
	return 0;
}